<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class CouponsConfig extends Model
{
    const COUPONS_TYPE_SIGNIN = 1;//签到即送。。。
    const COUPONS_TYPE_REGISTER = 2;//注册即送。。。
    const COUPONS_TYPE_SECKILL = 3;//秒杀
    const COUPONS_TYPE_SHOP = 4;//购物券
    public static $couponsTypeMap = [
        self::COUPONS_TYPE_REGISTER =>"",
        self::COUPONS_TYPE_SIGNIN=>"签到",
        self::COUPONS_TYPE_SECKILL=>"秒杀",
        self::COUPONS_TYPE_SHOP   =>"购物",
    ];

    protected $table="coupons_config";
    protected $fillable = [
      "title","descript","expire_day","type","required_days"
    ];
    //

    public function coupons(){
        return $this->hasMany(Coupon::class);
    }
}
